# Django settings for this project.
# -*- coding: UTF-8 -*-

from os import *
from properties import *

DEBUG = debug
TEMPLATE_DEBUG = DEBUG

ADMINS = (
     ('Antoni Aloy', 'tresorer@bulma.net'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = database_engine
DATABASE_NAME = database_name
DATABASE_USER = database_user           # Not used with sqlite3.
DATABASE_PASSWORD = database_password   # Not used with sqlite3.
DATABASE_HOST = database_host        	# Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = database_port        	# Set to empty string for default. Not used with sqlite3.

APP_ROOT = app_root

# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'Europe/Madrid'

# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'es-es'

SITE_ID = 1

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
# Ojito ojito. Ha d'acabar en una / que si no hi ha problemes.

MEDIA_ROOT = media_root

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = media_url

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".

ADMIN_MEDIA_PREFIX = admin_media_prefix

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'hi(x-876tv3ffrkq_l*)hjnx6a=%2klt$10#*^0l=lngm50468wce'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
    'django.middleware.gzip.GZipMiddleware'
)

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = template_dirs

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'django.contrib.sitemaps',
    'socis',
)

# Configuracion para el envio de correo
EMAIL_HOST='localhost'

# Si estamos en modo depuracion mejor experiamos las sesiones.
if DEBUG:
	SESSION_EXPIRE_AT_BROWSER_CLOSE=True

#CACHE_BACKEND = 'locmem:///'
#CACHE_MIDDLEWARE_SECONDS=60
#DEFAULT_CHARSET = "UTF-8"
